/*
 * @Author: whq
 * @Date: 2022-12-28 13:25:01
 * @LastEditTime: 2023-07-30 21:11:31
 * @LastEditors: whq
 * @Description: 
 * @FilePath: \new-era-uniform_pc\src\view\HomePage\services.ts
 */
import { request } from '@/apis/axios'
import { NameType } from './type'

// 获取批次列表
export async function getBatchNameListApi() {
  return request<NameType>(import.meta.env.VITE_APP_AXIOS_API + '/v1/clothing/batchNameList', {
    method: 'GET',
  })
}
// 批量服装初始化
export async function geTinitClothingInfoApi(params: any) {
  return request<NameType>(import.meta.env.VITE_APP_AXIOS_API + '/v1/clothing/initClothingInfo', {
    method: 'GET',
    params
  })
}

// 查询 条件 获取校服列表
export async function getClothingListApi(data: any) {
  return request<NameType>(import.meta.env.VITE_APP_AXIOS_API + '/v1/clothing/clothingList', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data
  })
}
// 编辑校服·
export async function getClothingEditApi(data: any) {
  return request<NameType>(import.meta.env.VITE_APP_AXIOS_API + '/v1/clothing/clothingEdit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data
  })
}
// 删除校服
export async function getClothingRemoveApi(params: any) {
  return request<NameType>(import.meta.env.VITE_APP_AXIOS_API + '/v1/clothing/clothingRemove/'+params.clothingId, {
    method: 'GET',
  })
}
